
public class ResultClass implements Comparable<ResultClass> {
	public int id1;
	public int ts1;
	public int id2;
	public int ts2;
	public ResultClass(int id1,int ts1,int id2,int ts2){
		this.id1=id1;
		this.id2 = id2;
		this.ts1 = ts1;
		this.ts2 = ts2;
	}
	public int compareTo(ResultClass compareResult) {
		 
		if(this.id1!=compareResult.id1) 
			return this.id1 - compareResult.id1;
		
		else if(this.ts1!=compareResult.ts1)
			return this.ts1 - compareResult.ts1;
		else if(this.id2!=compareResult.id2)
			return this.id2 - compareResult.id2;
		else 
			return this.ts2 - compareResult.ts2; 
	}
	
	public String getResult(){
		return id1+":"+ts1+":"+id2+":"+ts2;
	}
	
}
